package com.jh.concurrent.base.chain;

/**
 * @author JH_Wong
 * @projectName newforward
 * @title
 * @package com.jh.concurrent.base.chain
 * @description
 * @date 2019-05-08 23:27
 */
public class ProcessTest {

    public void setUp(Request request){
        PrintProcesser printProcesser = new PrintProcesser();
        SaveProcesser saveProcesser = new SaveProcesser(printProcesser);
        PreProcesser preProcesser = new PreProcesser(saveProcesser);
        preProcesser.process(request);
        printProcesser.start();
        saveProcesser.start();
        preProcesser.start();
    }

    public static void main(String[] args) {
        Request request = new Request();
        request.setId(1);
        request.setName("AAA");

        ProcessTest app = new ProcessTest();
        app.setUp(request);

    }

}
